package models;

import javax.persistence.Entity;
import javax.persistence.Id;

import org.hibernate.validator.constraints.NotBlank;

import play.data.validation.Constraints.Required;
import play.db.ebean.Model;

@Entity
public class Place extends Model {

    private static final long serialVersionUID = 1L;

    @Id
    private Long id;

    @NotBlank(message = "Name cannot be blank")
    @Required(message = "A name is required")
    private String name;

    @Required(message = "A description is required")
    private String description;

    @Required(message = "An address is required")
    private String address;

    @NotBlank(message = "Latitude cannot be blank")
    @Required(message = "A latitude is required")
    private String latitude;

    @NotBlank(message = "Longitude cannot be blank")
    @Required(message = "A longitude is required")
    private String longitude;

    @Required(message = "A category is required")
    private String category;

    public static Finder<Long, Place> find = new Finder<Long, Place>(Long.class, Place.class);

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getLatitude() {
        return latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }

    public String getLongitude() {
        return longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }
}
